﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Manage/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<QianBuo.Lottery.Web.Areas.Manage.Models.Account.IndexModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.BeginForm(); %>
    <table class="table" width="100%">
        <tr class="th">
            <th colspan="3" align="left">
                搜索条件(只能查找<%=Model.MimSerchEndTime.ToShortDateString() %>至现在之间的数据)
            </th>
        </tr>
        <tr>
            <td>
                <label for="Serch_StartTime">
                    时间:</label>
                <%=Html.TextBoxFor(p => p.Serch.StartTime, new { @class = "text80", onclick = "WdatePicker()" })%>
            </td>
            <td>
                <label for="Serch_StartTime">
                    至:</label>
                <%=Html.TextBoxFor(p => p.Serch.EndTime, new { @class = "text80", onclick = "WdatePicker()" })%>
            </td>
            <td>
                <input type="submit" value="查找" />
            </td>
        </tr>
    </table>
    <%=Html.HiddenFor(p=>p.PageSize) %>
    <% Html.EndForm(); %>
    <p />
    <table class="table" width="100%">
        <tr class="th">
            <th>日期</th><th>充值金额</th><th>提款金额</th><th>购彩金额</th><th>返点金额</th><th>中奖金额</th><th>盈利</th>
        </tr>
        <% if(Model.SumCount>0){
        foreach (var item in Model.Reports)
        {%>
        <tr>
            <td>
                <%var date = string.Format("{0}-{1}-{2}", item.Year, item.Month, item.Day); %>
                <%=Html.ActionLink(date, "AccountDetail", "User", Url.Route(new {act="Index",cont="Account", serch = new { StartTime = date, EndTime = date }, returnurl = Url.Action("Index", Url.Route(new { Model.Serch,Model.Page,Model.PageSize})) }), Url.Route(new { @class = "a_blue" }))%>
                
            </td>
            <td align="right">
                <%=item.SumAddMoney.Value.ToString("F") %>
            </td>
            <td align="right">
                <%=item.SumTackMoney.Value.ToString("F")%>
            </td>
            <td align="right">
                <%=item.SumPlayMoney.Value.ToString("F")%>
            </td>
            <td align="right">
                <%=(item.SumBackMoney_Child.Value+item.SumBackMoney.Value).ToString("F")%>
            </td>
            <td align="right">
                <%=(item.SumWinMoney.Value+item.SumWinMoney_Child.Value).ToString("F")%>
            </td>
            <td align="right">
                <%=(item.SumPlayMoney - (item.SumBackMoney + item.SumBackMoney_Child + item.SumWinMoney + item.SumWinMoney_Child)).Value.ToString("F")%>
            </td>
        </tr>
        <% } %>
        <tr>
            <td>
                <font color="red">合计</font>
            </td>
            <td align="right">
                <%=Model.SumReport.SumAddMoney.Value.ToString("F")%>
            </td>
            <td align="right">
                <%=Model.SumReport.SumTackMoney.Value.ToString("F")%>
            </td>
            <td align="right">
                <%=Model.SumReport.SumPlayMoney.Value.ToString("F")%>
            </td>
            <td align="right">
                <%=(Model.SumReport.SumBackMoney_Child.Value+Model.SumReport.SumBackMoney.Value).ToString("F")%>
            </td>
            <td align="right">
                <%=(Model.SumReport.SumWinMoney.Value + Model.SumReport.SumWinMoney_Child.Value).ToString("F")%>
            </td>
            <td align="right">
                <%= (Model.SumReport.SumPlayMoney - (Model.SumReport.SumBackMoney + Model.SumReport.SumBackMoney_Child + Model.SumReport.SumWinMoney + Model.SumReport.SumWinMoney_Child)).Value.ToString("F")%>
            </td>
        </tr>
        <tr>
            <td colspan="9">
                <%=Html.Pager(Model.Page.Value, Model.PageSize.Value, Model.SumCount, "Page", Url.Route(new { Model.Serch, Model.PageSize, ReturnUrl = Request["ReturnUrl"], act = Request["act"], cont = Request["cont"] }), "PageSize")%>
            </td>
        </tr>
        <%}else{ %>
        <tr>
            <td colspan="9">
                无记录！
            </td>
        </tr>
        <%} %>
    </table>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="StyleAndScript" runat="server">
</asp:Content>
